1. Field of the Invention
The present invention relates to image processing utilizing a look-up table.
2. Description of the Related Art
An image sensing apparatus such as a digital still camera converts an electric signal, which represents a captured image obtained through opto-electronic conversion of the optical image of a subject by an image sensing device such as a CMOS or CCD, to digital data and records the digital data on a storage medium such as a memory card. The recorded digital data is read by a computer or the like and can be output by an output device such as a monitor.
A digital image captured by a digital still camera can readily be manipulated into an image having a color reproducibility desired by the user by having the user specify such parameter adjustment quantities as a tone curve, tint and color density and then applying image processing using a computer. Generally, when such image processing is executed, each pixel value of the input digital image is subjected to processing for successively adjusting the tone curve, tint and color density, etc., whereby the desired output image is obtained.
In order to raise the speed of processing in a system in which processing from the deciding of the parameter adjustment quantities to the outputting of the image is executed in dialog fashion, use is made of a three-dimensional look-up table (referred to as a “3D-LUT” below). More specifically, in addition to applying a tone curve correction and adjusting tint and color density, use is made of a method in which image processing inclusive of color matching is incorporated in a single 3D-LUT and the desired output image is obtained by referring to the 3D-LUT based upon each of the pixel values of the input digital image data.
The processing for incorporating image processing in a 3D-LUT includes the following:
(1) preparing a 3D-LUT that has been initialized in such a manner that an input value is output as is as an output value of the 3D-LUT; and
(2) successively applying a plurality of image processes to output values at grid points of the initialized 3D-LUT to thereby correct the output value of each of the grid points.
This makes it possible to create a 3D-LUT for a color conversion in which a value prior to application of image processing is adopted as an input value and a value after the application of a plurality of image processes is adopted as an output value.
If the number of grid points is made the same as the number of bits of the image data in the 3D-LUT described above, the number of grid points will be enormous (e.g., 2563 grid points in the case of an 8-bit RGB image). As a consequence, the operation for generating the 3D-LUT requires a long period of time. This offsets the advantage of using the 3D-LUT. On the other hand, if the number of grid points in the 3D-LUT is made too small, there may be a decline in the precision with which interpolation is performed between grid points at the time of the conversion to image data. Accordingly, a variety of techniques have been adopted in regard to the setting of grid points in a 3D-LUT. The specification of Japanese Patent Application Laid-Open No. 2002-015314 proposes an arrangement in which the above-mentioned grid points are set in accordance with the number of bits of input image data. In accordance with Japanese Patent Application Laid-Open No. 2002-015314, a 3D-LUT comprising (2n/8)+1 grid points of each color is generated in a case where the input image is composed of n bits.
However, the method described above always generates a 3D-LUT having the full data range of the image, namely 8 bits or 16 bits, as input values regardless of the range over which the input image data actually possesses values, i.e., regardless of the value range. This leads to various problems, namely wasting of grid points of a 3D-LUT that exceeds the value range of the input image data, and a decline in the image quality of the output image data. For example, with regard to image data in which the data range that can be expressed by this number of bits is not used fully, as in the case of a dark image, grid points of a 3D-LUT that exceeds the value range of the input image data will be wasted and a decline in image quality resulting form interpolation processing tends to occur.